<template>
  <RouterView />
</template>

<script setup lang="ts" name="app">
import { RouterView } from 'vue-router'
import confetti from 'canvas-confetti'
import { onMounted } from 'vue'

// 添加烟花效果
onMounted(() => {
  document.addEventListener('click', (event) => {
    confetti({
      particleCount: 50,
      spread: 70,
      origin: {
        x: event.clientX / window.innerWidth, // 鼠标点击点的x坐标比例
        y: event.clientY / window.innerHeight, // 鼠标点击点的y坐标比例
      },
      startVelocity: 30,
      ticks: 100,
      zIndex: 9999,

      shapes: ['circle'],
      // 彩虹颜色
      colors: ['#ff0000', '#00ff00', '#0000ff'],
    })
  })
})
</script>

<style scoped></style>
